
class Father {
  String name = "Father";
  int age = 30;

  void sayName() {
    print("my name is ${name}");
  }
}

class Son extends Father {

  @override
  void sayName() {
    print("my name is SonName");
    super.sayName();
  }
}

void main() {
  Father father = new Father();
  Son son = new Son();
  print("father.name -> ${father.name}");
  print("son.name -> ${son.name}");

  father.sayName();
  son.sayName();

}